Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add Sveltekit snippet for Svelte 5 #2548

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

nielk
Copy link
Contributor

@nielk nielk commented Oct 28, 2024

When using SvelteKit with Svelte 5, the SvelteKit snippets still generate snippets with Svelte 4 syntax.

I fixed this by detecting the current Svelte version and generating Svelte 4 or Svelte 5 snippets according to it.

It follows a discussion from Ypsilon on the Svelte discord:

I know there is a massive list of things to do probably , but wouldn't it be nice to have a use svelte 5 syntax option in the vscode extension. So when you use snippets, or feature like create route that it creates the files with the new runes syntax. And not the old export let data syntax ?

@YpsilonTM
Copy link
Contributor

Thank you sir, You are a hero. Let's hope it gets merged.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@YpsilonTM
Copy link
Contributor

Code style issues found in 10 files. Run Prettier with --write to fix. 🥲

@nielk
Copy link
Contributor Author

nielk commented Oct 28, 2024

@dummdidumm Thanks for the corrections, I went too fast…

@YpsilonTM Thanks, I forgot the pnpm format, I pushed the new changes

@dummdidumm dummdidumm merged commit 02847e0 into sveltejs:master Oct 28, 2024
3 checks passed
@nielk nielk deleted the svelte-kit-snipper-svelte-5 branch October 30, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants